Method and apparatus for generic mapping procedure GMP mapping and method and apparatus for generic mapping procedure GMP demapping

ABSTRACT

Embodiments of the present invention disclose a method for the generic mapping procedure GMP mapping, a method for GMP demapping, and an apparatus. The method for mapping includes: carrying, in an overhead GMP OH of the ith GMP block container, information about a TS that needs to be occupied by the (i+n)th GMP block container; adjusting the (i+n)th GMP block container according to the information about the TS that needs to be occupied by the (i+n)th GMP block container; performing, according to the adjusted (i+n)th GMP block container, the GMP mapping on customer service data to be sent, so that a receive end is capable of adopting a corresponding demapping manner according to a change of the block container, which implements lossless mapping and demapping processing by adopting a GMP for a variable block container.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2009/075987, filed on Dec. 24, 2009, which are hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

The present invention relates to the communications technology field,and in particular, to a method and an apparatus for generic mappingprocedure GMP mapping and a method and an apparatus for generic mappingprocedure GMP demapping.

BACKGROUND

As a core technology of a next-generation transport network, an OTN(Optical transport network, OTN) includes electrical layer and opticallayer technical specifications. The OTN has rich OAM (OperationAdministration and Maintenance, operation, administration andmaintenance) functions, a powerful TCM (Tandem Connection Monitoring,tandem connection monitoring) capability, and an outband FEC (ForwardError Correction, forward error correction) capability, is capable ofimplementing flexible scheduling and management of a large-capacityservice, and is becoming a main stream technology of a backbonetransport network.

On an electrical processing layer, the OTN technology defines a “digitalwrapper (Digital Wrapper)” structure with powerful functions to map andwrapper customer service data to facilitate transmission in the OTN andimplement management and monitoring on the customer service data. Thedigital wrapper technology includes technical methods such as: mappingand a multiplexing structure of an optical channel transport unit (OUT,Optical Channel Transport Unit), time division multiplex of an opticalchannel data unit (ODU, Optical Channel Data Unit), time divisionmultiplex of an optical channel payload unit (OPU, Optical ChannelPayload Unit-k Overhead), and mapping of the customer service data.

With the rapid development of data services, more and more customerservices need to be transmitted through the OTN. The present OTNmechanism cannot well satisfy and directly bear various services withdifferent rates. In view of this problem, the ITU-T (InternationalTelecommunication Union-Telecommunication Standardization Sector,International Telecommunication Union-Telecommunication StandardizationSector) is discussing on formulating a new optical transport networkframe ODUflex frame to solve this problem. The ODUflex still keeps anoriginal ODU structure and is capable of bearing the services and packetservices with any constant bit rate (CBR). For different services,different mapping procedures are used to map service signals to the OPU.

The ODUflex cannot be directly sent onto a line and needs to beencapsulated in an HO ODU (Higher Order Optical Channel Data Unit,higher order optical channel data unit) and transmitted through an HOOTU (Higher Order Optical Channel Transport Unit, higher order opticalchannel transport unit).

At present, a mode of mapping the ODUflex to the HO ODU uses a GMP(Generic Mapping Procedure, generic mapping procedure). The ODUflexoccupies several TSs (Time Slots, time slots) of the HO ODU. The GMP isa generic mapping procedure of the OTN and is specifically as follows:Generate a customer entity quantity value Cn and clock information ofper service frame period; then, use the sigma-delta algorithm tocalculate a distribution pattern of customer data in a payload area; andmap Cn records of customer data to corresponding locations of thedistribution pattern.

Due to an irregularly change feature of packet service traffic, theODUflex needs to provide different bandwidths in different periods tosatisfy different service traffic and adjust a bandwidth of an ODUflexchannel without interrupting the packet service. The adjustment processrelates to an adjustment of bandwidth that is occupied when the HO ODUbears the ODUflex, that is, an adjustment of TSs in the HO ODU. A GMPblock container is a space that bears the ODUflex and is formed frommultiple TSs. Therefore, to adapt to the changes of the packet servicetraffic, a mechanism is required to adjust a size of the GMP blockcontainer.

SUMMARY

Embodiments of the present invention provide a method an apparatus forthe generic mapping procedure GMP mapping and a method and an apparatusfor generic mapping procedure GMP demapping.

On one aspect, an embodiment of the present invention provides a methodfor generic mapping procedure GMP mapping. The method includes:carrying, in an overhead GMP OH of the ith GMP block container,information about a time slot TS that needs to be occupied by the(i+n)th GMP block container; adjusting the (i+n)th GMP block containeraccording to the information about the TS that needs to be occupied bythe (i+n)th GMP block container; and performing, according to theadjusted (i+n)th GMP block container, the GMP mapping on customerservice data to be sent.

On another aspect, an embodiment of the present invention provides amethod for generic mapping procedure GMP demapping. The method includes:obtaining information about a time slot TS that needs to be occupied bythe (i+n)th GMP block container, where the information is carried in anoverhead GMP OH of the ith GMP block container; and performing the GMPdemapping on customer service data of the (i+n)th GMP block containeraccording to the information about the TS that needs to be occupied bythe (i+n)th GMP block container.

On still another aspect, an embodiment of the present invention providesan apparatus for generic mapping procedure (GMP) mapping. The apparatusincludes: an encapsulation unit, configured to carry, in an overhead GMPOH of the ith GMP block container, information about a time slot TS thatneeds to be occupied by the (i+n)th GMP block container; an adaptationunit, configured to adjust the (i+n)th GMP block container according tothe information about the TS that needs to be occupied by the (i+n)thGMP block container; and a mapping unit, configured to perform,according to the adjusted (i+n)th GMP block container, the GMP mappingon customer service data to be sent.

On the last aspect, an embodiment of the present invention provides anapparatus for generic mapping procedure GMP demapping. The apparatusincludes: a decapsulation unit, configured to obtain information about atime slot TS that needs to be occupied by the (i+n)th GMP blockcontainer, where the information is carried in an overhead GMP OH of theith GMP block container; and a demapping unit, configured to implementthe GMP demapping on customer service data of the (i+n)th GMP blockcontainer according to the information about the TS that needs to beoccupied by the (i+n)th GMP block container.

The technical solutions of the embodiments of the present inventionprovide a mechanism for triggering a TS adjustment. A transmit end adds,in a GMP OH of a GMP block container, information about a TS that needsto be occupied by the GMP block container so that a receive end iscapable of adopting a corresponding demapping mode according to changesof the block container. In this way, lossless mapping and demappingprocessing on a variable block container by adopting the GMP isimplemented.

BRIEF DESCRIPTION OF THE DRAWINGS

To make the technical solutions in the embodiments of the presentinvention or in the prior art clearer, the following briefly describesthe accompanying drawings involved in the description about theembodiments or the prior art. Apparently, the accompanying drawingsdescribed below are merely some embodiments of the present invention,and a person skilled in the art can derive other accompanying drawingsfrom these accompanying drawings without any creative effort.

FIG. 1 is a structural diagram of an OTN frame according to anembodiment of the present invention;

FIG. 1 a is an example diagram of TS distribution according to anembodiment of the present invention;

FIG. 2 is a flow chart of a general method according to Embodiment 1 ofthe present invention;

FIG. 3 is a first schematic diagram of an encapsulation mode ofinformation M according to Embodiment 1 of the present invention;

FIG. 4 is a second schematic diagram of an encapsulation mode ofinformation M according to Embodiment 1 of the present invention;

FIG. 5 is a first flow chart of a specific method according toEmbodiment 1 of the present invention;

FIG. 6 is an example diagram of performing GMP mapping based on themethod in FIG. 5 according to an embodiment of the present invention;

FIG. 7 is a second flow chart of a specific method according toEmbodiment 1 of the present invention;

FIG. 8 is an example diagram of performing GMP mapping based on themethod in FIG. 7 according to Embodiment 1 of the present invention;

FIG. 9 is a schematic diagram of a TS adjustment and a mappinggranularity change according to Embodiment 1 of the present invention;

FIG. 10 is a flow chart of a general method according to Embodiment 2 ofthe present invention;

FIG. 11 is a first flow chart of a specific method according toEmbodiment 2 of the present invention;

FIG. 12 is a second flow chart of a specific method according toEmbodiment 2 of the present invention;

FIG. 13 is a general function block diagram of an apparatus for GMPmapping according to Embodiment 3 of the present invention;

FIG. 14 is a detailed function block diagram of an apparatus for GMPmapping according to Embodiment 3 of the present invention;

FIG. 15 is a general function block diagram of an apparatus for GMPdemapping according to Embodiment 4 of the present invention; and

FIG. 16 is a detailed function block diagram of an apparatus for GMPdemapping according to Embodiment 4 of the present invention.

DETAILED DESCRIPTION

To meet a requirement of an ODUflex bandwidth adjustment and achieve alossless TS adjustment, embodiments of the present invention provide aTS adjustment mechanism and a method and an apparatus for implementingGMP adaptive processing during the TS adjustment. To achieve thelossless TS adjustment, a transmit end includes, in a GMP overhead, TSinformation (which is represented as information M in the embodiments)used to indicate the TS adjustment so as to correlate the TS adjustmentwith GMP mapping and demapping processing. A receive end perceives a TSchange of a GMP block container on the transmit end according to contentof the information M and performs lossless demapping processingaccording to the adjusted GMP block container.

To make the objectives, technical solutions, and merits of theembodiments of the present invention clearer, the following clearly andcompletely describes the technical solutions in the embodiments of thepresent invention with reference to the accompanying drawings in theembodiments of the present invention. Obviously, the describedembodiments are only a part of the embodiments of the present inventionrather than all the embodiments. All other embodiments obtained by aperson skilled in the art based on the embodiments in the presentinvention without creative efforts shall fall within the protectionscope of the present invention.

Embodiment 1

FIG. 1 is a diagram of a format of an OTN frame according to the presentembodiment. As shown in FIG. 1, the OTN frame is a standard modularstructure with 4080 columns×4 rows. The 16 columns in a header of theOTN frame are overhead bytes, 3808 columns in the middle are payloads,and 256 columns in the tail are FEC check bytes. The OTN frame includes:FAS (Frame Alignment Signal, frame alignment signal) bytes that arelocated in row 1 and columns 1-7 and used to provide a function of framesynchronization location, where the seventh byte of the FAS is amultiframe indication (Multi-Frame Alignment Signal, MFAS) that is usedto indicate overhead distribution when data of multiple customerservices is borne in a time division multiplexing mode; OTUk OH (OpticalChannel Transport Unit-k Overhead, optical channel transport unit-koverhead) bytes that are located in row and columns 8-14 and used toprovide a network management function at an optical channel transportunit level; ODUk OH (Optical Channel Data Unit-k Overhead, opticalchannel data unit-k overhead) bytes that are located in rows 24 andcolumns 114 and used to provide maintenance and operation functions;OPUk OH (Optical Channel Payload Unit-k Overhead, optical channelpayload unit-k overhead) bytes that are located in columns 15-16 andused to provide a customer service data adaptation function, where theOPUk OH bytes include a payload structure identifier (Payload StructureIdentifier, PSI), the PSI corresponds to 0-255 possible values under theMFAS indication, byte 0 is a customer service data type indication(Payload Type, PT), and other bytes are reserved (Reserved, RES) forfuture expansion; OPUk (Optical Channel Payload Unit-k, optical channelpayload unit-k) bytes that are located in columns 17-3824 and used toprovide a customer service data bearing function, where customer servicedata to be transmitted is encapsulated into the OPUk; and FEC bytes thatare located in columns 3825-4080 and used to provide error detection andcorrection functions.

The coefficient k indicates a supported bit rate. Different bit ratescorrespond to different types of OPUk, ODUk, and OTUk. When k is 0, itindicates that the bit rate is 1.25 Gbit/s; when k is 1, it indicatesthat the bit rate is 2.5 Gbit/s; when k is 2, it indicates that the bitrate is 10 Gbit/s; when k is 3, it indicates that the bit rate is 100Gbit/s. The OPUk bytes and the OPUk OH bytes form an OPUk frame; theOPUk frame, the ODUk OH bytes, and the FAS bytes form an ODUk frame; andthe ODUk frame, the OTUk OH bytes, and the FEC bytes form an OTUk frame.

A mapping procedure refers to a method of mapping different types ofservices to be sent into an OPU payload area (Payload Area). The presentembodiment uses a GMP mapping procedure to map the customer service datainto the OPU. FIG. 1 a is an example diagram of TS distribution usingGMP mapping according to the present embodiment. As shown in FIG. 1 a, aGMP OH in FIG. 1 a is equivalent to the OPUk OH in FIG. 1. The GMP OH inthis embodiment includes TS information used to indicate a TSadjustment. One or more TSs in FIG. 1 a form a GMP block container totransmit the customer service data.

FIG. 1 a uses OPU2 to describe a specific GMP mapping method. Thepayload area of the OPU2 frame is divided into 8 TSs, where four rows ofa column form a time slot and the TSs are identified as TS1, TS2, TS3,and till TS8. The TSs are identified in this manner in cyclic until theTSs of all columns in the payload area are allocated. Eight OPU2 framesform an OPU2 8-multiframe. The customer service data can be mapped intoone or more time slots in a payload area of the OPU2 8-multiframe. Oneor more TSs in the OPU2 8-multiframe may form a GMP block container tobear the service data. Here, three TSs, namely, TS1, TS3, and TS4, areused to transmit the service data.

The customer service data is placed into the GMP block container in aunit of row. When time slots in a row are full, a similar placingoperation is conducted in corresponding time slots in the next row. Asshown in FIG. 1 a, the GMP block container occupies three TSs and amapping granularity is 3-byte (byte). When the customer data is placedinto the GMP block container, 3 bytes of customer data are placed intothe first row in column 17, column 19, and column 20 respectively in aclock period (determined by clock information during the mapping) andanother 3 bytes of customer data are placed to the first row in column25, column 27, and column 28 respectively in the second clock period.The rest can be deduced by analogy. After a row is full, a similarplacing operation is conducted in the next row.

Embodiment 1 of the present invention provides a method for genericmapping procedure GMP mapping. This method may be based on the framestructure in FIG. 1. The mapping method is a processing method on atransmit end.

FIG. 2 is a flow chart of a general method according to Embodiment 1 ofthe present invention. As shown in FIG. 2, the method includes:

S201. Carry, in an overhead GMP OH of the ith GMP block container,information about a time slot TS that needs to be occupied by the(i+n)th GMP block container.

S202. Adjust the (i+n)th GMP block container according to theinformation about the TS that needs to be occupied by the (i+n)th GMPblock container.

S203. Perform, according to the adjusted (i+n)th GMP block container,the GMP mapping on customer service data to be transmitted.

In the present embodiment, the TS may be adjusted when the transmit endreceives an external TS adjustment instruction or a triggering command.

To facilitate description, this embodiment takes n=1 as an example todescribe a principle of the GMP mapping in detail. Assume that a size ofthe (i+1)th GMP block container is changed, information about a TS thatneeds to be occupied by the changed (i+1)th GMP block container is ableto be obtained from the TS information carried in the GMP OH of the ithblock container. A change of a next GMP block container is notified inadvance in a previous GMP block container. Therefore, a receive end iscapable of adaptively adjusting a demapping mode to achieve losslessdata. A specific implementation manner on the receive end is describedin detail in subsequent embodiments.

The TS information in the present embodiment includes TS quantityinformation, where the TS quantity information is associated with themapping granularity. That is, the TS quantity is consistent with themapping granularity, and the TS quantity and the mapping granularity areadjusted simultaneously. Alternatively, the TS information may alsoinclude the TS quantity information and mapping granularity information,where the TS quantity and the mapping granularity are adjustedseparately. In this embodiment, a specific TS distribution condition,that is, which TSs transmit the customer service data, is indicated inthe PSI of the OTN frame.

1. The TS quantity and the mapping granularity are adjustedsimultaneously. For this condition, the TS information includes the TSquantity information. Optionally, the TS quantity information may berepresented as a change indication of the TS quantity.

For this condition, step S202 and step S203, may specifically include:simultaneously adjusting the size and mapping granularity of the (i+1)thGMP block container according to the TS quantity; performing, accordingto the adjusted size and mapping granularity of the (i+1)th GMP blockcontainer, the GMP mapping on the customer service data to betransmitted.

2. The TS quantity and the mapping granularity are adjusted separately.For this condition, the TS information includes the TS quantity and themapping granularity. The TS quantity may be adjusted first and then themapping granularity is adjusted; or, the mapping granularity is adjustedfirst and then the TS quantity is adjusted, so that the TS quantity andthe mapping granularity are consistent finally.

When the TS quantity is adjusted, the TS quantity of the (i+1)th GMPblock container is carried in the overhead GMP OH of the ith GMP blockcontainer, where the TS quantity needs to be adjusted. Step S202 andstep 203 include: adjusting the size of the (i+1)th GMP block containeraccording to the TS quantity; and performing, according to the adjustedsize of the (i+1)th GMP block container and the mapping granularity ofthe ith GMP block container, the GMP mapping on the customer servicedata to be transmitted.

When the mapping granularity is adjusted after the TS quantity isadjusted, after step S202 and step 203, the method further includes:carrying a mapping granularity of the (j+1)th GMP block container in anoverhead GMP OH of the jth GMP block container, where the mappinggranularity needs to be adjusted; adjusting the mapping granularity ofthe (j+1)th GMP block container according to the carried mappinggranularity; and performing, according to the size of the jth GMP blockcontainer and the mapping granularity of the (j+1)th GMP blockcontainer, the GMP mapping on the customer service data to betransmitted. To facilitate description, this embodiment takes m=1 as anexample to describe the principle of the GMP mapping.

In the present embodiment, optionally, when a bandwidth is to beincreased, perform the TS adjustment first and then change the mappinggranularity; when a reducing adjustment is performed on the TSs, thatis, a reducing adjustment is performed on the TSs, change the mappinggranularity first and then perform the TS adjustment. This embodiment ofthe present invention is not restricted herein and the adjustment may beperformed in a reverse order according to the preceding manner.Regardless of whether the adjustments are performed simultaneously orseparately, a final objective is to adjust the TS quantity and an M-byteto be consistent. For example, originally, there are 3 TSs and themapping granularity is 3-byte; if the TSs are increased by 1, regardlessof whether the adjustments are performed simultaneously or separately, afinal result should be that there are 4 TSs and the mapping granularityis 4-byte.

The following describes an encapsulation mode of the information aboutthe TS (information M for short) that needs to be occupied by the GMPblock container in step S201 of Embodiment 1 of the present invention.

FIG. 3 is a schematic diagram of an encapsulation mode of information Maccording to this embodiment of the present invention. This figure isapplicable to a condition in which the TS quantity and a mappinggranularity are adjusted simultaneously. As shown in FIG. 3, three samepieces of information M are placed in rows 1-3 of column 15 in thegeneric mapping procedure overhead GMP OH. The information M refers tothe TS quantity information, ranging from 1 to 80. Specifically, in abyte in row 1 and column 15, bit 1 to bit 8 may all be used to place theinformation M, that is, the quantity information of the TSs occupied bythe GMP block container. Similarly, the same TS quantity information asthat in row 1 and column 15 are placed in respective 8 bits in row 2 andcolumn 15 and in row 3 and column 15. When the TS adjustment needs to beperformed, the information M is directly changed to a valuecorresponding to the adjusted TSs so that the next GMP block containeris adjusted to be of a size indicated by the changed information M.

Assume that the current GMP block container occupies three TSs and thenext GMP block container needs to occupy four TSs. Uniformly change thevalues of the three pieces of information M in the GMP OH of the currentGMP block container to 4 in a binary format so as to trigger that thesize of the next GMP block container is adjusted to occupy 4 TSs. Anobjective of placing the three same pieces of information M is to ensureaccuracy and prevent an error introduced during transmission. Thereceive end may obtain the information M through a majority decision.For example, when the three pieces of information M are consistent, itis indicated that the transmission is correct and any piece ofinformation M is selected to indicate the quantity of the TSs occupiedby the GMP block container. When two pieces among the three pieces ofinformation M are consistent and another piece of information M isdifferent, any one of the two pieces of information M that areconsistent with each other is selected to indicate the quantity of theTSs occupied by the GMP block container. When all the three pieces ofinformation M are different, it is indicated that the transmission isfaulty and the quantity of the TSs occupied by the GMP block containerremains unchanged.

In the present embodiment, when the TS quantity information and themapping granularity information are adjusted simultaneously, in thepreceding encapsulation mode, the information M is not only the TSquantity information but also the mapping granularity informationM-bytes. A concept of the mapping granularity refers to the number ofbytes used as a unit to map the customer data to be transmitted to theOPUk. If the mapping granularity is 1, the customer data to betransmitted is placed into the OPUk one byte by one byte. If the mappinggranularity is 3-byte, the customer data to be transmitted is placedinto the OPUk in a unit of 3 bytes. In this case, when the TS quantityis changed, the mapping granularity is also changed accordingly. Theencapsulation mode in FIG. 3 is applicable to the condition in which theGMP block container and the mapping granularity are changedsimultaneously.

But a person skilled in the art should understand that the information Mis not limited to include only the TS quantity information or themapping granularity information. In another specific application,current TS status information or information about an interactionbetween a source end and a sink end may further be included. Moreover,the placing position and the encryption mode of the information M inthis embodiment of the present invention are not limited to thepreceding described modes. That is, the overhead indication thattriggers the TS adjustment is not limited to a change of the informationM and may be specified to be an overhead indication that is speciallyformulated for triggering the TS adjustment.

FIG. 4 is a schematic diagram of another encapsulation mode ofinformation M according to this embodiment of the present invention.This figure is not only applicable to the condition in which the TSquantity and the mapping granularity are adjusted simultaneously butalso applicable to a condition in which the TS quantity and the mappinggranularity are adjusted separately. To make the description uniform,the subsequent embodiments describe various encapsulation methods in thepresent invention in detail with reference to FIG. 4 and specifictables.

In the following Table 1 to Table 6, the encapsulation mode of theinformation M is applicable to the condition in which the TS quantityand the mapping granularity are changed simultaneously. The TS quantityinformation is also the mapping granularity information. When the TSquantity is changed, the mapping granularity is also changedaccordingly. For example, when it is indicated that the TS quantity isincreased by 1, it is also indicated that the mapping granularity isincreased by 1. Table 1 to Table 6 describe 6 states corresponding tochanges of the information M, that is, states that the information Mremains unchanged, is increased by 1, is decreased by 1, is increased by2, is decreased by 2, and is increased or decreased by a value greaterthan 2.

TABLE 1 Information M change indication table 1 2 3 4 5 6 7 8 9 10 11 1213 14 I D U U U U U U U U U U U U U U 0 0

As shown in Table 1, 16 bits in rows 1-2 and column 15 in FIG. 4 areexpanded to form Table 1. Bit 1 to bit 14 in rows 1-2 and column 15 inFIG. 4 correspond to bit 1 to bit 14 in Table 1, which are all used tostore the information M, where “U” indicates data and a value is 0 or 1.Bit 15 to bit 16 correspond to bit 15 to bit 16 in Table 1, where theletter I indicates an increasing indication while the letter D indicatesa decreasing indication. When I/D=00, it is indicated that the TSquantity remains unchanged. In this case, “U” in bit 1 to bit 14indicates the actual quantity of TSs.

TABLE 2 Information M change indication table 1 2 3 4 5 6 7 8 9 10 11 1213 14 I D I U I U I U I U I U I U I U 1 0

As shown in Table 2, “U” indicates the data and “I” indicates that thebit is reversed. In Table 2, odd bits among bit 1 to bit 14 are reversedbased on Table 1. That is, bit 1, bit 3, bit 5, bit 7, bit 9, bit 11,and bit 13 are reversed. In addition, I/D=10, which indicates that theinformation M is changed and specifically indicates that the TS quantityis increased by 1 in the next GMP block container.

TABLE 3 Information M change indication table 1 2 3 4 5 6 7 8 9 10 11 1213 14 I D U I U I U I U I U I U I U I 0 1

In Table 3, when even bits among bit 1 to 14 are reversed based on Table1, that is, bit 2, bit 4, bit 6, bit 8, bit 10, bit 12, and bit 14 arereversed, and I/D=01, it is indicated that the TS quantity is decreasedby 1 in the next GMP block container.

TABLE 4 Information M change indication table 1 2 3 4 5 6 7 8 9 10 11 1213 14 I D U I I U U I I U U I I U U I 1 0

As shown in Table 4, when bit 2, bit 3, bit 6, bit 7, bit 10, bit 11,and bit 14 are reversed based on Table 1 and I/D=10, it is indicatedthat the TS quantity needs to be increased by 2 in the next GMP blockcontainer.

TABLE 5 Information M change indication table 1 2 3 4 5 6 7 8 9 10 11 1213 14 I D I U U I I U U I I U U I I U 0 1

As shown in Table 5, when bit 1, bit 4, bit 5, bit 8, bit 9, bit 12, andbit 13 are reversed based on Table 1 and I/D=01, it is indicated thatthe TS quantity needs to be decreased by 2 in the next GMP blockcontainer.

TABLE 6 Information M change indication table 1 2 3 4 5 6 7 8 9 10 11 1213 14 I D Binary value binary value 1 1

As shown in Table 6, when I/D=11, it is indicated that the increasing ordecreasing amplitude of the TS quantity value is greater than 2. In thiscase, directly enter a binary value in bit 1 to bit 14 to indicate theTS quantity value after a large-amplitude adjustment is made. Forexample, the original quantity of the TSs occupied by the GMP blockcontainer is 30; at present, the size of the block container needs to beadjusted to occupy 35 TSs; because the TS change amplitude is greaterthan 2, the I/D is set to 11 and the information M in bit 1 to bit 14 ischanged to a binary value of 35.

The preceding is merely an exemplary implementation mode. Various changeconditions of the TS quantity may also be indicated by using another bitreversal rule together with different I/D values, which is notrestricted in this embodiment of the present invention.

In the present embodiment, when the TS quantity information and themapping granularity information are adjusted separately, theencapsulation mode shown in FIG. 4 may be modified so that both the TSquantity information M and the mapping granularity information M′ areincluded in the GMP OH. A 14-bit space may house two times informationM. Therefore, it may be considered to save the capacity, that is, thecapacity for placing the information M is reduced to 7 bits and theother 7 bits are used to place the information M′. As shown in FIG. 4,bit 1 to bit 7 in rows 1-2 of column 15 of the GMP OH are used to storethe information M, where the information M is the TS quantityinformation ranging from 1 to 80; bit 8 to bit 14 are used to store theinformation M′, where the information M′ is the mapping granularityinformation ranging from 1 to 80. The I/D is an increasing or decreasingindication, where the value is 0 or 1 and is shared by the information Mand information M′.

Table 7 to Table 17 are separate change indication tables of theinformation M (TS quantity) and the information M′ (mappinggranularity). As shown in Table 7 to Table 17, this encapsulation modeis applicable to the condition in which the GMP block container and themapping granularity are changed separately. That is, when the TSquantity is changed, the mapping granularity remains unchanged; when themapping granularity is changed, the TS quantity remains unchanged. Thepresent embodiment uses the values of the information M, information M′,and I/D to indicate the change conditions of the TS quantity and mappinggranularity.

TABLE 7 Indication table for unchanged information M and information M′1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U U U U U U U U U U U U U U 0 0

As shown in Table 7, when I/D=00, it is indicated that the TS quantityinformation and the mapping granularity information remain unchanged.

TABLE 8 Indication table for changed information M and unchangedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D I U I U I U I U U UU U U U 1 0

As shown in Table 8, when any one of the TS quantity and the mappinggranularity is changed, the other one remains unchanged. For example,when the TS quantity is changed, the I/D is set to 10 and odd bits amongbit 1 to bit 7, that is, bit 1, bit 3, bit 5, and bit 7 are reversedbased on Table 7, indicating that the TS quantity is increased by 1 inthe next GMP block container. Data in bit 8 and bit 14 is unchanged,indicating that the mapping granularity remains unchanged.

TABLE 9 Indication table for changed information M and unchangedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U I U I U I U U U UU U U U 0 1

As shown in Table 9, when even bits among bit 1 to bit 7 are reversedbased on Table 7, the I/D is set to 01, and the data in bit 8 to bit 14is unchanged, it is indicated that the TS quantity needs to be decreasedby 1 in the next GMP block container while the mapping granularityremains unchanged.

TABLE 10 Indication table for changed information M and unchangedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U I I U U I I U U UU U U U 1 0

As shown in Table 10, when bit 2, bit 3, bit 6, and bit 7 among bit 1 tobit 7 are reversed based on Table 7, the I/D is set to 10, and the datain bit 8 to bit 14 is unchanged, it is indicated that the TS quantityneeds to be increased by 2 in the next GMP block container while themapping granularity remains unchanged.

TABLE 11 Indication table for changed information M and unchangedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D I U U I I U U U U UU U U U 0 1

As shown in Table 11, when bit 1, bit 4, and bit 5 among bit 1 to bit 7are reversed based on Table 7, the I/D is set to 01, and the data in bit8 to bit 14 is unchanged, it is indicated that the TS quantity needs tobe decreased by 2 in the next GMP block container while the mappinggranularity remains unchanged.

TABLE 12 Indication table for changed information M and unchangedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D Binary value binaryvalue U U U U U U U 1 1

As shown in Table 12, when the increasing or decreasing amplitude of theTS quantity is greater than 2, a binary value is directly entered in bit1 to bit 7, indicating the TS quantity value after the large-amplitudeadjustment is made, that is, indicating that the TS quantity is changedto a value represented by the binary value in the next GMP blockcontainer. Because the data in bit 8 to bit 14 is unchanged, the mappinggranularity remains unchanged.

TABLE 13 Indication table for unchanged information M and changedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U U U U U U U I U IU I U I 1 0

As shown in Table 13, when the mapping granularity is changed, the TSquantity remains unchanged. For example, the I/D is set to 10, even bitsamong bit 8 to bit 14 are reversed based on Table 7, and data in bit 1to bit 7 is unchanged so as to indicate that the mapping granularityneeds to be increased by 1 in the next GMP block container while the TSquantity remains unchanged.

TABLE 14 Indication table for unchanged information M and changedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U U U U U U U U I UI U I U 0 1

As shown in Table 14, the I/D is set to 01, odd bits among bit 8 to bit14 are reversed based on Table 7, and the data in bit 1 to bit 7 isunchanged so as to indicate that the mapping granularity needs to bedecreased by 1 in the next GMP block container while the TS quantityremains unchanged.

TABLE 15 Indication table for unchanged information M and changedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U U U U U U U U I IU U I I 1 0

As shown in Table 15, the I/D is set to 10, bit 9, bit 10, bit 13, andbit 14 among bit 8 to 14 are reversed based on Table 7, and the data inbit 1 to bit 7 is unchanged so as to indicate that the mappinggranularity needs to be increased by 2 in the next GMP block containerwhile the TS quantity remains unchanged.

TABLE 16 Indication table for unchanged information M and changedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U U U U U U U I U UI I U U 0 1

As shown in Table 16, the I/D is set to 01, bit 8, bit 11, and bit 12among bit 8 to bit 14 are reversed based on Table 7, and the data in bit1 to bit 7 is unchanged so as to indicate that the mapping granularityneeds to be decreased by 2 in the next GMP block container while the TSquantity remains unchanged.

TABLE 17 Indication table for unchanged information M and changedinformation M′ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I D U U U U U U U Binaryvalue binary value 1 1

As shown in Table 17, when the increasing or decreasing amplitude of themapping granularity is greater than 2, a binary value is directlyentered in bit 8 to bit 14, indicating a mapping granularity after thelarge-amplitude adjustment is made, that is, indicating that the mappinggranularity is changed to the value represented by the binary value inthe next GMP block container. Because the data in bits 1 to bit 7 isunchanged, the TS quantity remains unchanged.

The preceding specific encapsulation mode is used for only describingthis embodiment of the present invention. The placing position andencapsulation mode of the information M or information M′ in Embodiment1 of the present invention are not limited to the preceding describedmodes.

FIG. 5 is a first flow chart of a specific method according toEmbodiment 1 of the present invention. An execution body of this methodis a transmit end. FIG. 5 describes a condition in which a GMP blockcontainer and a mapping granularity are changed simultaneously. As shownin FIG. 5, the method includes:

S501. Use a PSI [0-255] of a 256-multiframe of an HO ODU to complete acondition indication of an HO ODU TS occupied by an optical transportnetwork frame ODUflex.

Specifically, the TS condition indication indicates the TSs that formthe ODUflex (that is, a specific TS distribution condition).

S502. After the TS condition indication is complete, trigger operationsof TS switchover and mapping granularity changing through a change ofinformation M in a GMP OH, where the information M is conditioninformation about the TSs occupied by the GMP block container, whichincludes at least quantity information of the TSs occupied by the GMPblock container and may further include, for example, a current TSstatus information or information about an interaction between a sourceend and a sink end.

Optionally, the specific process of S502 may include:

Modify information M in a GMP OH of the ith GMP block container, where iis a positive integer and is equal to or greater than 1, and may beflexibly controlled according to an adjustment requirement after the TScondition indication is complete, that is, the information M in the GMPOH of the first, the second . . . or the ith GMP block container may bemodified after the TS condition indication is complete; if the GMP usesa mapping granularity that associates with the TS quantity to performmapping, the information M is also mapping granularity informationM-byte. Modify the information M in the GMP OH of the ith GMP blockcontainer to indicate that a container adjustment and mappinggranularity changing are performed in the next (the (i+1)th) GMP blockcontainer, where the size of the ith GMP block container remains thequantity of the originally occupied TSs and the original mappinggranularity is still used, in the ith GMP block container, to performmapping processing on customer service data.

The TS switchover and the mapping granularity changing are completed inthe next (the (i+1)th) GMP block container. A condition about anadjustment that needs to be performed in the (i+1)th GMP block containermay be obtained according to the information M in the GMP OH of theprevious (the ith) GMP block container. The size of the (i+1)th GMPblock container is adjusted to a size specified by the changedinformation M in the GMP OH of the ith GMP block container. If the GMPuses the mapping granularity that associates with the TS quantity toperform the mapping, the information M is also the mapping granularityinformation M-byte. In this case, the (i+1)th GMP block container alsouses the mapping granularity specified by the changed information M inthe GMP OH of the ith GMP.

S503. After the TS adjustment and the mapping granularity changing arecompleted, in the (i+1)th GMP block container, perform mappingprocessing on the customer service data to be sent according to theadjusted container size and the changed mapping granularity, that is,place the customer service data into the adjusted GMP block container inthe changed mapping granularity by using the GMP mapping processingmethod. In a subsequent GMP block container, perform normal GMP mappingprocessing on the customer service data to be sent in the adjusted blockcontainer according to the changed mapping granularity.

FIG. 6 is an example diagram of performing GMP mapping according to themethod in FIG. 5. As shown in FIG. 6, the ith GMP block containeroccupies three TSs and the customer service data is mapped into the GMPblock container based on a 3-byte mapping granularity; the size of the(i+1)th GMP block container is adjusted to four TSs and the customerservice data is mapped into the GMP block container based on a 4-bytemapping granularity.

FIG. 7 is a second flow chart of a specific method according toEmbodiment 1 of the present invention. An execution body of this methodis a transmit end. FIG. 7 describes a condition in which a GMP blockcontainer and a mapping granularity are changed separately. As shown inFIG. 7, the method includes:

S701. Use a PSI [0-255] of a 256-multiframe of an HO ODU to completecondition indication of an HO ODUTS occupied by an ODUflex.

S702. After the TS condition indication is complete, perform the TSswitchover operation through a change of information M in a GMP OH anduse the switched TS to perform GMP mapping.

Optionally, the specific process of S702 may include:

Modify information M in a GMP OH of the ith GMP block container toindicate that a container adjustment is performed in the next (the(i+1)th) GMP block container, where i is a positive integer and thisstep may be flexibly controlled according to an adjustment requirementafter the TS indication is completed, that is, the information M in theGMP OH of the first, the second . . . and the ith GMP block containermay be modified after the TS condition indication is completed. Theinformation M is information about the TSs occupied by the GMP blockcontainer, which includes at least the TS quantity information. The sizeof the ith GMP block container remains the quantity of the originallyoccupied TSs and the original mapping granularity is still used, in theith GMP block container, to perform mapping processing on customerservice data.

The TS switchover is completed in the (i+1)th GMP block container. Acondition of an adjustment in the (i+1)th GMP block container may beknown according to the information M in the GMP OH of the previous (theith) GMP block container. The (i+1)th GMP block container is adjusted tobe of a size specified by the information M. The mapping granularityused to perform the mapping processing in the (i+1)th GMP blockcontainer remains unchanged.

S703. Trigger an operation of mapping granularity changing through achange of information M′ in the GMP OH.

Optionally, the specific process of S703 may include:

Modify information M′ in a GMP OH of the jth GMP block container, wherej is a positive integer. When the TS quantity is adjusted first and thenthe mapping granularity is adjusted, j is greater than i+1. In thepresent embodiment, however, the mapping granularity may also beadjusted first and then the TS quantity is adjusted. Therefore, thepresent embodiment does not restrict a relationship between i and j.

In this case, the information M′ is GMP mapping granularity information,that is, M-byte. Modify the information M to indicate that in the next(the (j+1)th) GMP block container, the mapping granularity is changed tothat specified by the information M′.

The size of the jth GMP block container remains unchanged. The originalmapping granularity is still used, in the GMP block container j, toperform the mapping processing on the customer service data to be sent.The mapping granularity changing is completed in the (j+1)th GMP blockcontainer. The size of the (j+1)th GMP block container remainsunchanged; that is, the size of the (j+1)th GMP block container isconsistent with that of the jth GMP block container. The mappinggranularity used by the (j+1)th GMP block container may be knownaccording to the information M′ in the GMP OH of the previous (the jth)GMP block container. The mapping granularity in the (j+1)th GMP blockcontainer is changed to a value specified by the information M′.

S704. After the TS adjustment and the mapping granularity changing arecompleted, in the (j+1)th GMP block container, perform the mappingprocessing on the customer service data to be sent by using the changedmapping granularity. In a subsequent GMP block container, perform,according to the changed mapping granularity and the adjusted size ofthe block container, normal GMP mapping processing on the customerservice data to be sent.

FIG. 8 is an example diagram of performing GMP mapping based on themethod in FIG. 7 according to Embodiment 1 of the present invention. Asshown in FIG. 8, the ith GMP block container occupies three TSs andcustomer service data is mapped into the GMP block container in a 3-bytegranularity; the size of the (i+1)th GMP block container is adjusted tofour TSs and the customer service data is still mapped into the GMPblock container in the 3-byte granularity; the size of the jth GMP blockcontainer still occupies four TSs and the customer service data is stillmapped into the GMP block container in the 3-byte granularity; the sizeof the (j+1)th GMP block container still occupies four TSs and themapping granularity is adjusted to 4-byte, that is, the customer servicedata is mapped into the GMP block container in a 4-byte granularity.

FIG. 9 is a schematic diagram of a TS adjustment and a mappinggranularity change according to Embodiment 1 of the present invention.Information M or information M′ in FIG. 9 is placed in the first GMPoverhead position of each GMP block container. As shown in FIG. 9,assume that an ODUflex is transmitted over an HO ODU2. The ODUflexoccupies 3 TSs (TS1, TS3, and TS4, where a TS rate level is 1.25 Gbit/s)of the HO ODU2. After the ODUflex is mapped to an HO ODTU2.3 through aGMP, the ODUflex is multiplexed to the HO ODU2 through the HO ODTU2.3.Due to an increase of the ODUflex rate, four TSs (TS1, TS3, TS4, andTS5) of the HO ODU2 need to be occupied. In this case, to use the GMPprocessing method in this embodiment of the present invention,operations are performed based on the following mode (a mode in which aGMP block container and a mapping granularity are changedsimultaneously):

1. Complete a condition indication of an HO ODU2 TS occupied by theODUflex through a PSI [0-255] of a 256-multiframe of the HO ODU2, wherePSI [2], PSI [4], PSI [5], and PSI [6] indicate that the current ODUflexneeds to occupy TS1, TS3, TS4, and TS5.

2. After the TS condition indication is completed, trigger the TSswitchover and the mapping granularity changing by changing theinformation M in the GMP OH.

2.1 Change the information M in a GMP OH of the ith GMP block container,where the information M is changed from 3TS to 4TS.

The size of the ith GMP block container remains HO ODTU2.3.

The 3-byte mapping granularity is still used in the ith GMP blockcontainer to perform the mapping processing on the ODUflex.

The value i is a positive integer and may be flexibly controlledaccording to an adjustment requirement after the TS condition indicationis completed.

2.2 Complete the TS switchover and the mapping granularity changing inthe (i+1)th GMP block container.

Adjust the current GMP block container to HO ODTU2.4 according to theinformation M in the GMP OH of the previous (the ith) GMP blockcontainer.

Meanwhile, perform the mapping processing on the ODUflex in the (i+1)thGMP block container using a 4-byte mapping granularity.

3. After the TS adjustment and the mapping granularity changing arecompleted, the GMP performs normal mapping processing in block containerHO ODTU2.4 based on the 4-byte mapping granularity.

In the prior art, when the TS adjustment needs to be performed, thetransmit end is capable of completing the condition indication of the HOODU TS occupied by the ODUflex only by sending the PSI [0-255] of the256-multiframe to the receive end, and cannot enable the receive end toperceive when the transmit end performs the TS switchover operation. Dueto different HO ODUk rate levels, a phenomenon that boundaries of theGMP block container and boundaries of a 256-multiframe period are notaligned exists (for example, in ODU3, the GMP block container occupies a32-multiframe TS of ODU3; in ODU4, the GMP block container occupies an80-multiframe TS of ODU4; 80 and 256 does not have a multiplerelationship, and therefore, the phenomenon that the boundaries of theGMP block container and the boundaries of the 256-multiframe period arenot aligned may exist), which results in data damage during the TSswitchover.

In conclusion, a GMP in the prior art is capable of performing themapping processing for only a fixed container and cannot perform validprocessing for a case of a variable container. With the adjustment ofGMP block container, to avoid data damage, the GMP needs to have anadaptive capability during the container adjustment. The GMP in theprior art, however, cannot perform adaptive processing for a variablecontainer. As a result, the objective of lossless data cannot beachieved.

According to the method in Embodiment 1 of the present invention, thegeneric mapping procedure overhead GMP OH carries the information aboutthe time slot TS that needs to be occupied by the GMP block containerand an adjustment of the size of the next GMP block obtainer istriggered through a change of the TS information. In this manner,lossless TS switchover during the TS adjustment is implemented. Themapping granularity that is associated with the information about theoccupied TS is used to perform the mapping processing. Therefore, themapping granularity used by the next GMP block container may be changedaccordingly by modifying the TS information added in the GMP OH; or, theGMP block container and the mapping granularity may be changedseparately by modifying the TS information and mapping granularityinformation added in the GMP OH respectively. This method enhancesadaptation of the GMP and is capable of achieving lossless mapping anddemapping processing for a variable container and a variable mappinggranularity.

Embodiment 2

Embodiment 2 of the present invention provides a method for genericmapping procedure GMP demapping. The method is a processing method on areceive end.

FIG. 10 is a flow chart of a general method according to Embodiment 2 ofthe present invention. As shown in FIG. 10, the method includes:

S1001. Obtain information about a TS that needs to be occupied by the(i+n)th GMP block container, where the information is carried in anoverhead GMP OH of the ith GMP block container.

S1002. Perform GMP demapping on customer service data of the (i+n)th GMPblock container according to the TS information of the (i+n)th GMP blockcontainer.

A processing object of the demapping is the customer service data. Thatis, the customer service data is demapped from the GMP block container.

In an optional implementation manner, the TS information includes TSquantity, where the TS quantity and a mapping granularity are associatedand the GMP block container and the mapping granularity are changedsimultaneously, which corresponds to this optional implementationmanner.

The preceding method specifically includes: obtaining the quantity ofTSs that need to be occupied by the (i+n)th GMP block container, wherethe information is carried in the overhead GMP OH of the ith GMP blockcontainer; and performing the GMP demapping on the customer service dataof the (i+n)th GMP block container according to TS quantity of the(i+n)th GMP block container and a mapping granularity associated withthe TS quantity.

In another optional implementation manner, the TS information includesthe TS quantity and the mapping granularity, where the GMP blockcontainer and the mapping granularity are changed separately, whichcorresponds to this optional implementation manner.

The preceding method specifically includes: obtaining the quantity ofthe TSs that need to be occupied by the (i+n)th GMP block container,where the information is carried in the overhead GMP OH of the ith GMPblock container; performing the GMP demapping on the customer servicedata of the (i+n)th GMP block container according to the TS quantity ofthe (i+n)th GMP block container and the mapping granularity of the ithGMP block container; obtaining a mapping granularity of the (j+1)th GMPblock container, where the mapping granularity is carried in an overheadGMP OH of the jth GMP block container; and performing the GMP demappingon the customer service data of the (j+1)th GMP block containeraccording to the TS quantity of the jth GMP block container and themapping granularity of the (j+1)th GMP block container.

To facilitate description, the present embodiment takes n=1 as anexample to describe a principle of the GMP demapping in detail. FIG. 11is a first flow chart of a specific method according to Embodiment 2 ofthe present invention. The flowchart corresponds to a condition in whicha GMP block container and a mapping granularity are changedsimultaneously. As shown in FIG. 11, the method includes:

S1101. Obtain, based on a received PSI [0-255] indication of a256-multiframe of an HO ODU, a condition about an HO ODU TS that needsto be occupied by an ODUflex.

S1102. After obtain the TS condition indication, perform correspondingGMP demapping processing by detecting a change of information M in a GMPOH.

Optionally, the process of S1102 specifically includes:

1) Detect the information M in the GMP OH of the GMP block container andperform corresponding processing.

When detecting that information M in a GMP OH of a (for example, theith) GMP block container is changed, it is indicated that a TSadjustment is performed in the next (the (i+1)th) GMP block container,that is, the size of the GMP block container is adjusted and the mappinggranularity is also changed accordingly, indicating that demappingprocessing needs to be performed in the next (the (i+1)th) GMP blockcontainer according to the mapping granularity and block containerspecified by the information M. If no change is detected, it isindicated that in the next (the (i+1)th) GMP block container, the GMPdemapping processing is performed still according to the originalmapping granularity and the original block container.

2) Perform demapping processing in the next GMP block container.

Perform the corresponding demapping processing according to anindication of the information M in the GMP OH of the previous (the ith)GMP block container. When the information M indicates that the TS isswitched over, perform, according to the mapping granularity specifiedby the information M, the demapping processing in the GMP blockcontainer specified by the information M; that is, perform the demappingprocessing in the (i+1)th GMP block container according to the blockcontainer size specified by the information M and the mappinggranularity specified by the information M; or that is, demap customerservice data in the mapping granularity specified by the information Mby performing the GMP demapping processing in the block container of thesize specified by the information M. When the information M indicatesthat the TS is not switched over, perform the GMP demapping processingstill in the original GMP block container according to the originalmapping granularity.

S1103. After the TS adjustment and the mapping granularity changing arecomplete, perform normal GMP demapping processing in the adjusted blockcontainer according to the changed mapping granularity.

For an example diagram of performing the GMP demapping based on themethod shown in FIG. 11 in Embodiment 2 of the present invention, seeFIG. 6. As shown in FIG. 6, the ith GMP block container occupies threeTSs and the customer service data is demapped from the GMP blockcontainer based on a 3-byte mapping granularity; the size of the (i+1)thGMP block container is adjusted to 4 TSs and the customer service datais demapped from the GMP block container based on a 4-byte mappinggranularity.

FIG. 12 is a second flow chart of a specific method according toEmbodiment 2 of the present invention. This flow chart corresponds to acondition in which a GMP block container and a mapping granularity arechanged separately. As shown in FIG. 12, the method includes:

S1201. Obtain, based on a received PSI [0-255] indication of a256-multiframe of an HO ODU, a condition about an HO ODU TS that needsto be occupied by an ODUflex.

S1202: After obtaining the TS condition indication, performcorresponding GMP demapping processing during a condition adjustment bydetecting a change of information M in a GMP OH.

Optionally, the specific process of S1202 includes:

1) Detect the Information M in the GMP OH of the GMP Block Container andPerforming Corresponding Processing.

When detecting that information M in a GMP OH of the ith GMP blockcontainer is changed, it is indicated that a TS adjustment is performedin the next (the (i+1)th) GMP block container, that is, the size of the(i+1)th GMP block container is adjusted, indicating that the demappingprocessing needs to be performed in the next GMP block containeraccording to a block container specified by the changed information M.If no change is detected, it is indicated that in the next GMP blockcontainer, the demapping processing is performed still according to theoriginal block container. In the ith GMP block container, the demappingprocessing is performed still according to the original block container.

2) Perform the Demapping Processing in the Next (the (i+1)th) GMP BlockContainer.

Perform the corresponding demapping processing according to anindication of the information M in the GMP OH of the previous (the ith)GMP block container. When it is indicated that the TS is switched over,perform the demapping processing in the (i+1)th GMP block containeraccording to the block container size specified by the changedinformation M; when it is indicated that the TS is not switched over,perform the demapping processing in the (i+1)th GMP block containerstill according to the original block container size. The mappinggranularity used when the demapping is performed in the (i+1)th GMPblock container remains unchanged.

S1203. Perform corresponding GMP demapping during mapping granularitychanging by detecting a change of information M′ in the GMP OH.

Optionally, the specific process of S1203 may include:

1) Detect the Information M′ in the GMP OH of the GMP Block Containerand Performing the Corresponding Processing.

When information M′ in a GMP OH of the jth GMP block container ischanged, it is indicated that the mapping granularity is changed in thenext (the (j+1)th) GMP block container and that the demapping processingneeds to be performed in the next (the (j+1)th) GMP block containeraccording to the mapping granularity specified by the information M′.When the information M′ in the GMP OH of the jth GMP block containerremains unchanged, it is indicated that in the next (the (j+1)th) GMPblock container, the demapping processing is performed still accordingto the original mapping granularity. The value j is a positive integer.

2) Perform the Demapping Processing in the Next (the (j+1)th) GMP BlockContainer.

Perform the corresponding demapping processing according to anindication of the information M′ in the GMP OH of the previous (the jth)GMP block container. When it is indicated that the mapping granularityof the GMP is changed, perform the demapping processing in the (j+1)thGMP block container according to the mapping granularity specified bythe information M′; when it is indicated that the mapping granularity ofthe GMP remains unchanged, perform the demapping processing in the(j+1)th GMP block container still according to the original mappinggranularity, where the size of the (j+1)th GMP block container remainsunchanged.

S1204: After the TS adjustment and the mapping granularity changing arecompleted, perform normal GMP demapping processing in the adjusted blockcontainer according to the changed mapping granularity.

For an example diagram of performing the GMP demapping based on themethod shown in FIG. 12 in Embodiment 2 of the present invention, seeFIG. 8. As shown in FIG. 8, the ith GMP block container occupies 3 TSsand the customer service data is demapped from the GMP block containerbased on a 3-byte granularity; the size of the (i+1)th GMP blockcontainer is adjusted to 4 TSs and the customer service data is demappedfrom the GMP block container still based on the 3-byte granularity; thejth GMP block container still occupies 4 TSs and the customer servicedata is demapped from the GMP block container still based on the 3-bytegranularity; the (j+1)th GMP block container still occupies 4 TSs andthe mapping granularity is adjusted to 4-byte, that is, the customerservice data is demapped from the GMP block container based on a 4-bytegranularity.

The following describes the technical solution in Embodiment 2 of thepresent invention by using a specific example:

1. Obtain an indication about TS1, TS3, TS4, and TS5 of HO ODU2 thatneed to be occupied by the ODUflex based on the received PSI [0-255] ofthe 256-multiframe of the HO ODU2.

2. After obtaining the TS condition indication, perform thecorresponding GMP demapping processing by detecting a change of theinformation M in the GMP OH.

2.1. Detect that the information M in the GMP OH of the ith GMP blockcontainer is changed from 3TS to 4TS and trigger a response operation.

It is indicated that a TS adjustment is performed in the next (the(i+1)th) GMP block container, that is, the (i+1)th GMP block containeris adjusted to HO ODTU2.4; meanwhile, the mapping granularity is changedto 4-byte.

The size of the ith GMP block container remains HO ODTU2.3.

In the ith GMP block container, the ODUflex is demapped still by usingthe 3-byte mapping granularity.

2.2. Perform demapping processing in the next (the (i+1)th) GMP blockcontainer.

According to the indication of information M in the GMP OH of theprevious (the ith) GMP block container, perform the demapping processingin the adjusted GMP block container HO ODTU2.4 based on the changedmapping granularity 4-byte.

3. After the TS adjustment and the mapping granularity changing arecompleted, the GMP performs normal demapping processing in blockcontainer HO ODTU2.4 based on the 4-byte mapping granularity.

In the method in Embodiment 2 of the present invention, whether theinformation about the time slot TS occupied by the GMP block containeris changed in the generic mapping procedure GMP OH is detected. When itis detected that the TS information or the mapping granularityinformation is changed, corresponding adjustments on the size of the GMPblock container and the mapping granularity are triggered and thedemapping processing is performed according to the block container sizespecified by the changed TS information. In this way, adaptiveprocessing for a variable container and a variable mapping granularityis achieved and a lossless TS adjustment is implemented.

Embodiment 3

Embodiment 3 of the present invention provides an apparatus for genericmapping procedure GMP mapping. The apparatus is capable of implementingthe mapping method in Embodiment 1.

FIG. 13 is a function block diagram of an apparatus for GMP mappingaccording to Embodiment 3 of the present invention. As shown in FIG. 13,the apparatus 10 includes:

an encapsulation unit 101, configured to carry, in an overhead GMP OH ofthe ith GMP block container, information about a TS that needs to beoccupied by the (i+n)th GMP block container;

an adaptation unit 102, configured to adjust the (i+n)th GMP blockcontainer according to the information about the TS the needs to beoccupied by the (i+n)th GMP block container; and

a mapping unit 103, configured to perform, according to the adjusted(i+n)th GMP block container, the GMP mapping on customer service data tobe sent.

1) Optionally, the TS information includes TS quantity. The TS quantityand a mapping granularity are associated.

For this condition, the encapsulation unit 101 may further be configuredto carry, in the overhead GMP OH of the ith GMP block container, the TSquantity of the (i+n)th GMP block container, where the TS quantity needsto be adjusted; the adaptation unit 102 may further be configured tosimultaneously adjust the size of the (i+n)th GMP block container andthe mapping granularity according to the TS quantity; and the mappingunit 103 may further configured to perform, according to the adjustedsize of the (i+n)th GMP block container and the adjusted mappinggranularity, the GMP mapping on the customer service data to be sent.

2) Optionally, the TS information includes the TS quantity and themapping granularity.

For this condition, the encapsulation unit 101 may further configured tocarry, in the overhead GMP OH of the ith GMP block container, the TSquantity of the (i+n)th GMP block container that needs to be adjusted;the adaptation unit 102 may further be configured to adjust the size ofthe (i+n)th GMP block container according to the TS quantity; and themapping unit 103 may further be configured to perform the GMP mapping onthe customer service data to be sent according to the adjusted size ofthe (i+n)th GMP block container and the mapping granularity of the ithGMP block container.

Optionally, the encapsulation unit 101 may further be configured tocarry, in the overhead GMP OH of the jth GMP block container, a mappinggranularity of the (j+1)th GMP block container, where the mappinggranularity needs to be adjusted; the adaptation unit 102 may further beconfigured to adjust the mapping granularity of the (j+1)th GMP blockcontainer according to the carried mapping granularity; and the mappingunit 103 may further be configured to perform, according to the size ofjth GMP block container and the mapping granularity of the (j+1)th GMPblock container, the GMP mapping on the customer service data to besent.

FIG. 14 is a detailed function block diagram of the apparatus inEmbodiment 3 of the present invention. As shown in FIG. 14, theapparatus 20 includes:

a serial-to-parallel conversion unit 201, configured to distributeserial data to M cache pipes based on a byte granularity, where M is thequantity of TSs of an HO ODU that are occupied by an ODUflex and is alsoa mapping granularity; when the mapping granularity is 3-byte, theserial-to-parallel conversion unit 201 writes three bytes of customerdata into three cache pipes at a time in a parallel manner, that is,writes one byte of the customer data into each of the three cache pipes;

a channel unit (Channel 1-Channel M) 206, configured to serve as a cachepipe in the byte granularity;

an information generation unit 202, configured to generate datainformation C8M and clock information C8-delta during mapping, where C8Mindicates the amount of data in an M-byte granularity, where the data ismapped into a GMP block container; and the clock information refers to aspeed or mapping rate when the customer data is mapped into the GMPblock container;

a mapping unit 203, configured to read data from the M cache pipesaccording to a particular mapping algorithm, where the mapping algorithmis, for example, a “sigma-delta” algorithm; for example, when themapping granularity is 3, the customer data is read from 3 cache pipesin a unit of three bytes to an encapsulation unit;

the encapsulation unit 204, configured to encapsulate, the data and anoverhead into a frame; and

a TS adaptation unit 205, configured to perform a triggering operationon a TS adjustment and mapping granularity changing during GMP mapping.When the TS adjustment is performed (assuming that the TS quantity ischanged from M−1 to M), the serial-to-parallel conversion unit 201, themapping unit 203, and the encapsulation unit 204 are triggered accordingto a particular sequence to perform corresponding processing. Thespecific processing method includes: The TS adaptation unit 205calculates, based on the pipe data depth (the amount of data stored inthe current cache pipe), the C8M value, and a GMP block period (the timefor completing mapping processing on a GMP block container, alsoreferring to a multiframe period), the time when the serial-to-parallelconversion unit is triggered to switch from distributing data to M−1cache pipes to distributing data to M cache pipes. That is, after theswitchover, the data written into the cache pipes is mapped into a GMPblock of an adjusted container.

The following example describes a processing process when the TS and theM are switched over simultaneously.

Assume that the cache pipe data depth at a start time point of the GMPblock container is D; the amount of customer data that is in an M−1 bytegranularity and needs to be mapped into the current GMP block containeris represented as C8(M−1)_cur, where C8(M−1) cur is greater than orequal to D, and D is greater than 0; after C8(M−1) cur-D records of datain the M−1 byte granularity are written into ingresses of M−1 cachepipes, the serial-to-parallel conversion unit 201 switches fromdistributing data to M−1 cache pipes to distributing data to M cachepipes, that is, switches to writing data in an M-byte granularity intoingresses of M cache pipes.

After reading C8(M−1)_cur records of data in the M−1 byte granularity inthe M−1 cache pipes in the current GMP block period, the mapping unit203 switches to reading data in the M-byte granularity in the M cachepipes in the next GMP block period. The switchover time point is a GMPblock boundary. The encapsulation unit 204 multiplexes the GMP blockcontainer (HO ODTU.M) to the HO ODU at a boundary of an HO ODUmultiframe. The information generation unit 202 is configured to inputthe generated data information and clock information into theencapsulation unit 204, where the data information and the clockinformation are included in the GMP OH. The encapsulation unit 204 isfurther configured to generate an ODU OH and an OTU OH. In this case,the encapsulation unit 204 may be configured to uses the ODU OH, the OTUOH, and the GMP OH as an overhead of an OTN frame, and encapsulate theframe overhead and valid customer data into a frame.

The apparatus in this embodiment performs the triggering operation onthe time slot TS adjustment and the mapping granularity changing, whichmay enhance the GMP adaptation and achieve lossless mapping anddemapping processing for a variable container and a variable mappinggranularity.

Embodiment 4

Embodiment 4 of the present invention provides an apparatus for genericmapping procedure GMP demapping. The apparatus is capable ofimplementing the demapping method in Embodiment 2.

FIG. 15 is a general function block diagram of the apparatus for GMPdemapping in Embodiment 4 of the present invention. As shown in FIG. 15,the apparatus 30 includes:

a decapsulation unit 301, configured to obtain information about a timeslot TS that needs to be occupied by the (i+n)th GMP block container inan overhead GMP OH of the ith GMP block container; and

a demapping unit 302, configured to perform GMP demapping on customerservice data of the (i+n)th GMP block container according to the TSinformation of the (i+n)th GMP block container.

Optionally, the TS information includes TS quantity, where the TSquantity is associated with a mapping granularity. The decapsulationunit 301 is configured to obtain the quantity of TSs that need to beoccupied by the (i+n)th GMP block container, where the quantity of theTSs is carried in the overhead GMP OH of the ith GMP block container.The demapping unit 302 is configured to perform the GMP demapping on thecustomer service data of the (i+n)th GMP block container according tothe TS quantity of the (i+n)th GMP block container and the mappinggranularity associated with the TS quantity.

Optionally, the TS information includes the TS quantity and the mappinggranularity. The decapsulation unit 301 may be configured to obtain thequantity of the TSs that need to be occupied by the (i+n)th GMP blockcontainer, where the quantity of the TSs is carried in the overhead GMPOH of the ith GMP block container. The demapping unit 302 may beconfigured to perform the GMP demapping on the customer service data ofthe (i+n)th GMP block container according to the TS quantity of the(i+n)th GMP block container and the mapping granularity of the ith GMPblock container. The decapsulation unit 301 may further be configured toobtain a mapping granularity of the (j+m)th GMP block container, wherethe mapping granularity is carried in an overhead GMP OH of the jth GMPblock container. The demapping unit 302 may further be configured toperform the GMP demapping on customer service data of the (j+1)th GMPblock container according to the TS quantity of the jth GMP blockcontainer and the mapping granularity of the (j+1)th GMP blockcontainer.

FIG. 16 is a detailed specific function block diagram of the apparatusin Embodiment 4 of the present invention. As shown in FIG. 16, theapparatus 40 includes:

a decapsulation unit 401, configured to abstract an overhead from anoptical transport network frame;

a TS adaptation unit 402, configured to obtain time slot TS changeinformation and mapping granularity information during mapping from theoverhead and perform a corresponding triggering operation;

an information capture unit 403, configured to obtain data informationC8M and clock information C8-delta from the overhead;

a demapping unit 404, configured to demap customer service data carriedin the optical transport network frame and write the data into a cachepipe 406 in a multiple-byte granularity; and

a parallel-to-serial conversion unit 405, configured to combine payloaddata in the cache pipe 406 (Channel 1 to Channel M) in the multiple-bytegranularity as a serial data flow.

A DDS (Direct Digital Synthesizer) is a direct digital frequencysynthesizer, configured to recover a customer service clock.

The apparatus in this embodiment of the present invention obtains thetime slot TS change information and the mapping granularity changeinformation during the mapping from the overhead and performs thecorresponding triggering operation, which provides a GMP adaptationprocessing method for a variable container and a variable mappinggranularity and a triggering mechanism for lossless TS switchover. Theapparatus enhances the GMP adaptation and achieves lossless mapping anddemapping processing for the variable container and the variable mappinggranularity.

Persons of ordinary skill in the art should understand that all or partof the processes in the methods of the preceding embodiments may beimplemented by a program instructing relevant hardware. The program maybe stored in a computer readable storage medium. When the program runs,the processes in the embodiments of each of the preceding methods may beperformed. The storage medium may be a magnetic disk, a CD-ROM, aread-only memory (Read-Only Memory, ROM), a random access memory (RandomAccess Memory, RAM), and so on.

The preceding embodiments are merely provided for describing thetechnical solutions in the embodiments of the present invention, but notintended to limit the present invention. Persons of ordinary skill inthe art should understand that modifications may be made on thetechnical solutions recorded in each of the preceding embodiments, orequivalent replacements may be made on a part of the technical features;and these modifications or replacements do not make the nature of thecorresponding technical solutions depart from the spirit and scope ofthe technical solutions in each of the embodiments of the presentinvention.

What is claimed is:
 1. A method for generic mapping procedure (GMP)mapping in an optical transport network (OTN), the method comprising:carrying, in an optical channel payload unit (OPU) overhead of a firsthigher order (HO) OPU multiframe, a change indication of a quantity ofone or more time slots of a second HO OPU multiframe subsequent to thefirst HO OPU multiframe that need to be occupied by an ODUflex;adjusting, in accordance with the change indication, the quantity of oneor more time slots of the second HO OPU multiframe that need to beoccupied by the ODUflex to a value different than the quantity of timeslots of the first HO OPU multiframe occupied by the ODUflex; andperforming, GMP mapping on the ODUflex, so that the ODUflex is mappedinto the adjusted quantity of one or more time slots of the second HOOPU multiframe.
 2. The method according to claim 1, wherein the methodfurther comprises: adjusting, mapping granularity of GMP mapping of theODUflex in accordance with the change indication, wherein adjustedmapping granularity is associated with the adjusted quantity of one ormore time slots of the second HO OPU multiframe; and wherein performing,GMP mapping on the ODUflex comprises: performing, GMP mapping on theODUflex according to the adjusted mapping granularity.
 3. A method forgeneric mapping procedure (GMP) demapping in an optical transportnetwork (OTN), the method comprising: obtaining, a change indication ofa quantity of one or more time slots of a second higher order (HO)optical channel payload unit (OPU) multiframe subsequent to a first HOOPU multiframe that need to be occupied by an ODUflex, wherein thechange indication is carried in an OPU overhead of the first HO OPUmultiframe and indicates the quantity of time slots of the second HO OPUmultiframe occupied by the ODUflex being different than the quantity oftime slots of the first HO OPU multiframe occupied by the ODUflex;performing GMP demapping on the second HO OPU multiframe to obtain theODUflex according to the change indication.
 4. The method according toclaim 3, wherein performing GMP demapping on the second HO OPUmultiframe to obtain the ODUflex according to the change indicationcomprises: performing GMP demapping on the second HO OPU multiframeaccording to the changed quantity of one or more time slots of thesecond HO OPU multiframe and changed mapping granularity, and thechanged mapping granularity is associated with the changed quantity. 5.An apparatus for generic mapping procedure (GMP) mapping in an opticaltransport network (OTN), the apparatus comprising: a processor and acomputer readable medium having a plurality of computer executableinstructions stored thereon which, when executed by the processor, causethe processor to implement: carrying, in an optical channel payload unit(OPU) overhead of a first higher order (HO) OPU multiframe, a changeindication of a quantity of one or more time slots of a second HO OPUmultiframe subsequent to the first HO OPU multiframe that need to beoccupied by an ODUflex; adjusting, in accordance with the changeindication, the quantity of one or more time slots of the second HO OPUmultiframe that need to be occupied by the ODUflex to a value differentthan the quantity of time slots of the first HO OPU multiframe occupiedby the ODUflex; and performing, GMP mapping on the ODUflex, so that theODUflex is mapped into the adjusted quantity of one or more time slotsof the second HO OPU multiframe.
 6. The apparatus according to claim 5,wherein the processor is further caused to implement: adjusting, mappinggranularity of GMP mapping of the ODUflex in accordance with the changeindication, wherein adjusted mapping granularity is associated with theadjusted quantity of one or more time slots of the second HO OPUmultiframe; and wherein performing, GMP mapping on the ODUflexcomprises: performing, GMP mapping on the ODUflex according to theadjusted mapping granularity.
 7. An apparatus for generic mappingprocedure (GMP) demapping in an optical transport network (OTN), theapparatus comprising: a processor and a computer readable medium havinga plurality of computer executable instructions stored thereon which,when executed by the processor, cause the processor to implement:obtaining, a change indication of a quantity of one or more time slotsof a second higher order (HO) optical channel payload unit (OPU)multiframe subsequent to a first HO OPU multiframe that need to beoccupied by an ODUflex, wherein the change indication is carried in anOPU overhead of the first HO OPU multiframe and indicates the quantityof time slots of the second HO OPU multiframe occupied by the ODUflexbeing different than the quantity of time slots of the first HO OPUmultiframe occupied by the ODUflex; performing GMP demapping on thesecond HO OPU multiframe to obtain the ODUflex according to the changeindication.
 8. The according to claim 7, wherein performing GMPdemapping on the second HO OPU multiframe to obtain the ODUflexaccording to the change indication comprises: performing GMP demappingon the second HO OPU multiframe according to the changed quantity of oneor more time slots of the second HO OPU multiframe and changed mappinggranularity, and the changed mapping granularity is associated with thechanged quantity.
 9. The method according to claim 1, wherein: thechange indication is an increase indication or a decrease indication,wherein the increase indication indicates that the quantity of one ormore time slots of the second HO OPU multiframe that need to be occupiedby the ODUflex is to be increased, and the decrease indication indicatesthat the quantity of one or more time slots of the second HO OPUmultiframe that need to be occupied by the ODUflex is to be decreased;and adjusting, in accordance with the change indication, the quantity ofone or more time slots of the second HO OPU multiframe that need to beoccupied by the ODUflex comprises: increasing, in accordance with theincrease indication, the quantity of one or more time slots of thesecond HO OPU multiframe that need to be occupied by the ODUflex, ordecreasing, in accordance with the decrease indication, the quantity ofone or more time slots of the second HO OPU multiframe that need to beoccupied by the ODUflex.
 10. The method according to claim 1, whereinthe change indication is for triggering GMP demapping adjustment at areceive end receiving the first HO OPU multiframe.
 11. The methodaccording to claim 1, wherein the second HO OPU multiframe is the nextHO OPU multiframe of the first HO OPU multiframe; and the changeindication carried in the OPU overhead of the first HO OPU multiframeindicates that the quantity of one or more time slots occupied by theODUflex will start to change at the second HO OPU multiframe.
 12. Themethod according to claim 3, wherein: the change indication is anincrease indication or a decrease indication, wherein the increaseindication indicates that the quantity of one or more time slots of thesecond HO OPU multiframe that need to be occupied by the ODUflex is tobe increased, and the decrease indication indicates that the quantity ofone or more time slots of the second HO OPU multiframe that need to beoccupied by the ODUflex is to be decreased; and performing GMP demappingon the second HO OPU multiframe to obtain the ODUflex according to thechange indication comprises: performing GMP demapping on the second HOOPU multiframe to obtain the ODUflex according to an increased quantityof one or more time slots or a decreased quantity of one or more timeslots, wherein the increased quantity is determined in accordance withthe increase indication, and the decreased quantity is determined inaccordance with the decrease indication.
 13. The method according toclaim 3, wherein the second HO OPU multiframe is the next HO OPUmultiframe of the first HO OPU multiframe; and the change indicationcarried in the OPU overhead of the first HO OPU multiframe indicatesthat the quantity of one or more time slots occupied by the ODUflex willstart to change at the second HO OPU multiframe.
 14. The apparatusaccording to claim 5, wherein: the change indication is an increaseindication or a decrease indication, wherein the increase indicationindicates that the quantity of one or more time slots of the second HOOPU multiframe that need to be need to be occupied by the ODUflex is tobe increased, and the decrease indication indicates that the quantity ofone or more time slots of the second HO OPU multiframe that need to beoccupied by the ODUflex is to be decreased; and the adjusting, inaccordance with the change indication, the quantity of one or more timeslots of the second HO OPU multiframe that need to be occupied by theODUflex comprises: increasing, in accordance with the increaseindication, the quantity of one or more time slots of the second HO OPUmultiframe that need to be occupied by the ODUflex, or decreasing, inaccordance with the decrease indication, the quantity of one or moretime slots of the second HO OPU multiframe that need to be occupied bythe ODUflex.
 15. The apparatus according to claim 5, wherein the changeindication is for triggering GMP demapping adjustment at a receive endreceiving the first HO OPU multiframe.
 16. The apparatus according toclaim 5, wherein the second HO OPU multiframe is the next HO OPUmultiframe of the first HO OPU multiframe; and the change indicationcarried in the OPU overhead of the first HO OPU multiframe indicatesthat the quantity of one or more time slots occupied by the ODUflex willstart to change at the second HO OPU multiframe.
 17. The apparatusaccording to claim 7, wherein: the change indication is an increaseindication or a decrease indication, wherein the increase indicationindicates that the quantity of one or more time slots of the second HOOPU multiframe that need to be occupied by the ODUflex is to beincreased, and the decrease indication indicates that the quantity ofone or more time slots of the second HO OPU multiframe that need to beoccupied by the ODUflex is to be decreased; and performing GMP demappingon the second HO OPU multiframe to obtain the ODUflex according to thechange indication comprises: performing GMP demapping on the second HOOPU multiframe to obtain the ODUflex according to an increased quantityof one or more time slots or a decreased quantity of one or more timeslots, wherein the increased quantity is determined in accordance withthe increase indication, and the decreased quantity is determined inaccordance with the decrease indication.
 18. The apparatus according toclaim 7, wherein the second HO OPU multiframe is the next HO OPUmultiframe of the first HO OPU multiframe; and the change indicationcarried in the OPU overhead of the first HO OPU multiframe indicatesthat the quantity of one or more time slots occupied by the ODUflex willstart to change at the second HO OPU multiframe.